﻿@model ForumTreeVM

@using System.Web.Mvc.Ajax
@using System.Web.Mvc.Html
@using nanoCMS.Forum.Concrete
@using nanoCMS.Forum.WebUI.Models.AdminViewModels
@using nanoCMS.Forum.WebUI.Models.ViewModels


<div style="border: 1px solid #CCCCCC; margin: 2px;">@Model.ForumEntry.Title (@Model.ForumEntry.Order)
    <div>@Model.ForumEntry.Description</div>
    <div>
        @Ajax.ActionLink("Edit", "Edit", "ForumAdmin", new { forumID = Model.ForumEntry.ForumID }, new AjaxOptions { UpdateTargetId = "admin_content" }) -
        @Ajax.ActionLink("Up", "Reorder", "ForumAdmin", new { forumID = Model.ForumEntry.ForumID, up = true }, new AjaxOptions { UpdateTargetId = "admin_content"} ) -
        @Ajax.ActionLink("Down", "Reorder", "ForumAdmin", new { forumID = Model.ForumEntry.ForumID, up = false }, new AjaxOptions { UpdateTargetId = "admin_content" })
    </div>
    <div style="margin: 0px 2px 2px 15px;">
        @foreach (var item in Model.Childern)
        {
            Html.RenderPartial("ForumDisplayPartial", item); 
        }
    </div>
</div>